﻿
using CSharpLibs.Annotations;

#pragma warning disable 0169

namespace System
{
	[Builtin]
	public struct UInt32 : IUSignIntegralValue, IComparable, IComparable<UInt32>, IEquatable<UInt32>
	{
		public const uint MaxValue =  4294967295;
		public const uint MinValue = 0;
		
		[DummyPrimitiveField]
		private uint ff;

		public int CompareTo(object o)
		{ return this.CompareTo((UInt32)o); }

		public int CompareTo(UInt32 ui)
		{
			if(this == ui)
				return 0;
			else if(this < ui)
				return -1;
			else
				return 1;
		}

		public override bool Equals(object o)
		{ return (o is UInt32) && (this == ((UInt32)o)); }

		public bool Equals(UInt32 ui)
		{ return this == ui; }

		public override int GetHashCode()
		{ return ((int)(this >> 2)); }

		public static uint Parse(string sv)
		{ return (uint)PrimitiveHelper.ParseUSignIntegral(sv); }

		public override string ToString()
		{ return PrimitiveHelper.USignIntegralToString(this); }
	}
}

#pragma warning restore 0169
